﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;
using AMS.Inventory.PDA.Castle.DataAccess;
using System.Collections;

namespace AMS.Inventory.PDA
{
    static class Program
    {
        public static Hashtable Hashtable;

        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [MTAThread]
        static void Main()
        {
            //string systemLanguage = "ZH";
            //switch (System.Globalization.CultureInfo.CurrentCulture.Parent.EnglishName)
            //{
            //    case "Chinese (Traditional)":
            //        systemLanguage = "HK";
            //        break;
            //    case "Chinese (Simplified)":
            //        systemLanguage = "ZH";
            //        break;
            //    case "English":
            //        systemLanguage = "EN";
            //        break;
            //    default:
            //        systemLanguage = "ZH";
            //        break;
            //}
            //ModCommon.DefaultLanguage = systemLanguage;

            Hashtable = clsLocalization.ReadContectResource("Program", ModCommon.DefaultLanguage);
            ModCommon.MagboxTitle = clsLocalization.getFromContentNames(Hashtable, "MagboxTitle");
            ModCommon.SysmsgTitle = clsLocalization.getFromContentNames(Hashtable, "SysmsgTitle");
            ModCommon.ErrorMsg = clsLocalization.getFromContentNames(Hashtable, "ErrorMsg");
            ModCommon.CheckState = clsLocalization.getFromContentNames(Hashtable, "CheckState");
            ModCommon.NoCheckState = clsLocalization.getFromContentNames(Hashtable, "NoCheckState");
            ModCommon.DBName =ModCommon.PrjPath+ clsLocalization.getFromContentNames(Hashtable, "DBName");
            ModCommon.AssetsSql = clsLocalization.getFromContentNames(Hashtable, "AssetsSql");
            Application.Run(new FrmMain());
            
        }
    }
}